1. Field of the Invention
The present invention relates generally to computer audio systems. More particularly, the present invention relates to removal of clicks in computer audio systems.
2. Related Art
Microsoft Windows XP operating system (hereinafter referred to simply as “Windows XP”) allows a hardware implementation of “dynamic stream redirect,” wherein an audio stream is redirected from one audio output device to another audio output device. In a laptop computer running Windows XP, for example, an audio stream that is being outputted on an internal speaker in a laptop computer can be dynamically redirected to a headphone by a hardware switch when the headphone is plugged into the laptop computer. Alternatively, an audio stream that is being outputted to a headphone plugged into a headphone jack on a laptop computer running Windows XP can be dynamically redirected by a hardware switch to an internal speaker in the laptop computer when the headphone is unplugged. During dynamic stream redirect in Windows XP also causes the audio output device that was originally outputting the audio stream to be muted.
However, the operation of the audio architecture in Microsoft Windows Vista (hereinafter referred to simply as “Windows Vista”) operating system has been changed compared to Windows XP such that dynamic stream redirect is not allowed in hardware. A Windows Hardware Logo Program requirement disallows switching between two audio outputs, where the switching occurs outside of the operating system's awareness. Also, Windows Hardware Quality Labs requires Windows Vista to support multistreaming, which allows a user to listen to two different audio sources on separate audio output devices. For example, multistreaming allows a user to listen to music on internal speakers in a laptop computer while conducting a Voice over Internet Protocol (VoIP) call on a headset that is plugged into the laptop computer. Thus, a user familiar with dynamic stream redirect in Windows XP cannot conventionally utilize this feature in Windows Vista.
FIG. 1 is a diagram illustrating audio system 100 for Windows XP. Audio system 100 includes client application 102, audio resource stack 104, which includes software resources 106 and hardware resources 108, hardware switch 110, speakers 112, and headphones 114. Software resources 106 include Windows audio engine 116 and audio processing object (APO) 118 and hardware resources 108 include direct memory access (DMA) engine 120 and digital-to-analog converter (DAC) 122. In audio system 100, client application 102, which can be, for example, Windows Media Player, generates an audio stream, which is provided to audio resource stack 104. The audio stream passes through Windows audio engine 116, which is a Microsoft component inside Windows XP operating system that determines the path of the audio stream, and through APO 118, which provides Digital Sound Processing (DSP) features, such as equalization, noise reduction, and echo cancellation, for the audio stream. Windows audio engine 116 directs the audio stream to DMA engine 120, which transfers the audio stream from memory to DAC 122 inside the audio codec. DAC 122 converts the audio stream from a digital format to an analog format for input to speakers 112 or headphones 114.
As shown in FIG. 1, hardware switch 110 receives the audio stream, which is in analog format, from DAC 122 and routes the audio stream to either speakers 112 or headphones 114 for playback. Thus, for Windows XP, the audio stream can be coupled to a hardware switch residing outside of the audio resource stack for routing to either speakers or headphones. However, this arrangement is not allowed for Windows Vista, since the operating system is not aware of the hardware switch and, therefore, cannot update the operating system's Graphical User Interface (GUI) regarding the outputted audio stream.
FIG. 2 is a diagram illustrating conventional audio system 200 for Windows Vista. Conventional audio system 200 includes client application 202, audio resource stacks 204 and 206, and audio endpoints 208 and 210. Audio resource stack 204 includes software resources 212, which includes Windows audio engine 214 and APO 216, and hardware resources 218, which includes DMA engine 220 and DAC 222. Audio resource stack 206 includes software resources 224, which include Windows audio engine 226 and APO 228, and hardware resources 230, which include DMA engine 232 and DAC 224. Windows audio engine 214, APO 216, DMA engine 220, and DAC 222 in audio resource stack 204 are substantially similar in function and operation to respective Windows audio engine 226, APO 228, DMA engine 232, and DAC 234 in audio resource stack 206.
In FIG. 2, client application 202, which can be, for example, Windows Media Player, provides an audio stream for audio endpoint 208, which provides audio output 236 (e.g., music). Audio endpoint 208 can be an audio output device, such as internal speakers in a laptop computer. For audio endpoint 208, an audio stream from client application 202 is passed to Windows audio engine 214, which is a Microsoft component inside Windows Vista for directing the audio stream to appropriate components in audio resource stack 204. Windows audio engine 214 sends the audio stream to APO 216, which functions similar to a plug-in to the Windows audio engine. In particular, APO 216 can provide DSP features, such as equalization, noise reduction, and echo cancellation, for the audio stream. After processing by APO 216, the audio stream is routed back to Windows audio engine 214, which directs the audio stream to DMA engine 220. DMA 220 transfers the audio stream from memory to DAC 222, which converts the audio stream from a digital format to an analog format for input to audio endpoint 208 (e.g., speakers).
In FIG. 2, audio resource stack 204 is independent of audio resource stack 206. In Windows Vista, there can be multiple copies or instances of software resources (e.g., Windows audio engines 214 and 216) that are independent of each other. Also, there can be multiple hardware resources (e.g., DMA engines 220 and 232) that are independent of each other. In Windows Vista, each audio endpoint is associated with a separate audio resource stack. For example, audio endpoint 208 is associated with audio resource stack 204. However, the audio resource stack and its associated audio endpoint are dormant until activated by instantiation of a client application on the audio resource stack that is connected to the audio endpoint. In other words, the audio resource stack and its associated audio endpoint can be activated by selecting an audio endpoint to link to a client application, such as Windows Media Player. When an audio resource stack is activated by a client application, an audio stream outputted by the client application can be routed through the audio resource stack for output by the audio endpoint that is connected to that stack.
Thus, in conventional audio system 200, client application 202 activates audio resource stack 204, thereby enabling an audio stream provided by client application 202 to be outputted by audio endpoint 208 (e.g., speakers) as audio output 236. However, since no client application, as indicated by dashed block 238, is selected and linked to audio resource stack 206, no audio stream is directed to audio endpoint 210 (e.g., headphones). Thus, in conventional audio system 200, without the present invention's audio endpoint bridge, a client application must be selected by the user for audio endpoint 210 to provide an audio stream to play over audio endpoint 210 (e.g., the headphones).
Accordingly, there is a strong need in the art to provide a method and system for achieving dynamic stream redirect in the Windows Vista operating system.